package org.wlw.ex;

import java.io.FileInputStream;
import java.io.FileNotFoundException;

public class TestException00 {
	public static void main(String[] args) {
		System.out.println("开始运行");
		int a = divide(12,0);
		System.out.println("-----------------"+a);
		System.out.println("结束运行");
	}
	
	public static int divide(int a,int b) {
		int n = 0;
		System.out.println("准备开始除法");
		n = a/b;
		System.out.println("除完，准备返回");
		return n;
	}
	
	public static void test() {
		//创建这个类的时候会抛出一个FileNotFoundException。
		//而FileNotFoundException不是RuntimeException。需要程序员手动处理、
		try {
			FileInputStream fis = new FileInputStream("aa");
		} catch(FileNotFoundException e) {
			
		}
	}
}
 